%module OgreRoot

%{
#include "OGRE/OgreRoot.h"
%}

%import "OgrePrerequisites.i"
%import "OgreCommon.i"
%import "OgreMeshManager.i"
%import "OgreRenderWindow.i"
%import "OgreTextureManager.i"
%import "OgreSceneManager.i"
%import "OgreRenderSystem.i"

namespace Ogre
{ 
	class Root {
	public:
        /** Constructor
        @param pluginFileName The file that contains plugins information.
            Defaults to "plugins.cfg", may be left blank to ignore.
		@param configFileName The file that contains the configuration to be loaded.
			Defaults to "ogre.cfg", may be left blank to load nothing.
		@param logFileName The logfile to create, defaults to Ogre.log, may be 
			left blank if you've already set up LogManager & Log yourself
		*/
		Root(const String& pluginFileName = "plugins.cfg", 
		     const String& configFileName = "ogre.cfg", 
		     const String& logFileName = "Ogre.log"); 
		static Root& getSingleton(void);
		static Root* getSingletonPtr(void);

		RenderSystem* getRenderSystemByName(const String& name);
		void setRenderSystem(RenderSystem* system);
 
		RenderWindow* initialise(bool autoCreateWindow
					 , const String& windowTitle = "OGRE Render Window",
					 const String& customCapabilitiesConfig = StringUtil::BLANK);

		SceneManager* createSceneManager(const String& typeName, 
			const String& instanceName = StringUtil::BLANK);

		SceneManager* createSceneManager(SceneTypeMask typeMask, 
			const String& instanceName = StringUtil::BLANK);

		void destroySceneManager(SceneManager* sm);

		SceneManager* getSceneManager(const String& instanceName) const;

		TextureManager* getTextureManager(void); 

		MeshManager* getMeshManager(void); 

		void startRendering(void);

		bool renderOneFrame(void);

		RenderWindow* createRenderWindow(const String &name
						 , unsigned int width
						 , unsigned int height
						 , bool fullScreen
						 , const NameValuePairList *miscParams = 0) ;
	};
};
